package com.mspbots.common;

import java.time.LocalDateTime;

/**
 * com.mspbots.common.StringKit
 *
 * @author Jason
 * @date 2019/12/24
 **/
public class StringKit {

    public static String color(String str, String color) {
        color = org.springframework.util.StringUtils.isEmpty(color) ? "#999d9c" : color;
        return "<span style='color:" + color + ";font-weight:bold'>" + str + "</span>";
    }

    public static String color(String str) {
        return color(str, "#FF0000");
    }

    public static void main(String[] args) {
//        System.out.println(LocalDateTime.of(LocalDate.now(), LocalTime.MIN));
//        System.out.println(LocalDateTime.now());
//        Duration duration = Duration.between(LocalDateTime.of(LocalDate.now(), LocalTime.MAX), LocalDateTime.now()).abs();
//
//        String utilization = String.format("%.1f", (float)duration.toMinutes()/60);
//
//        System.out.println(utilization);
        System.out.println(LocalDateTime.now().getDayOfWeek());
        System.out.println(LocalDateTime.now().getDayOfWeek());
//        DayOfWeek
    }

}
